<meta charset="utf-8"/>
<link rel="stylesheet" href="style/calendrier.css" type="text/css" media="screen" />

<script type="text/javascript" src="modeles/jquery.js"></script>
<script type ="text/javascript" src="modeles/javascriptFonctions.js"></script>
<script type ="text/javascript" src="modeles/calendrier.js"></script>

<?php
	if(isset($_SESSION["message"]))
	{
		echo $_SESSION["message"];
		unset($_SESSION["message"]);
	}
	
	$date = date("d/m/Y");


echo '<h2>Proposer une action de communication</h2>
<form action="index.php?module=actionComm&amp;action=proposerADC" method="post">';
?>	<p>
		<label class="creation" for="TitreAction">Titre* : </label>
		<input class="obligatoire" type="text" name="TitreAction" onBlur="verifChamp(this)" onFocus="blanc(this)"/>
	</p>
	<p>
		<label class="creation" for="ThemeAction">Thème : </label>
		<select name="Theme" >
		<?php
			foreach($theme as $t)
			{
				echo	'
							<option value="'.$t->get_id().'">'.$t->get_libelle().'</option>
						';
			}
		?>
		</select>
	</p>
	<p>
		<label class="creation" for="NbEtudiants">Nombre d'étudiants : </label>
		<input id="nbEtu" type="number" name="NbEtudiants" min="1" max=<?php echo '"'.ActionDeCommunication::getNbMaxEtuADC().'"'?> onBlur="verifChamp(this)" onFocus="blanc(this)"/>
	</p>	
	<p>
		<label class="creation" for="Date">Date de déroulement :</label>
		<?php
			echo '<input id="date" size=8 type="text" name="Date" placeholder="jj/mm/aaaa" class="calendrier"/>';
		?>
		<span id="erreurDate"></span>	
	</p>		
	<p>
		<label class="creation" for="Commentaire">Commentaire* :</label>
		<textarea class="obligatoire" name="Commentaire"  rows="8" cols="45" onBlur="verifChamp(this)" onFocus="blanc(this)"></textarea>
	</p>
	<p>
		<span id="erreur"></span>
	</p>
	<p>
		<input class="Ligne2" type='submit' value='Envoyer' name='Envoyer' onClick = "return verifFormulaireProposition()"/>
		<input class="Ligne2" type='submit' value='Annuler' name='Annuler'/>		
	</p>
</form>